<?php
	#-------------------------------------------------------------#
	# This file is part of the Kumomado - Virtual Window Platform #
	# for PHP. (c) 2009 Tsai, Min Che <tirme0812@gmail.com>       #
	# Please visit http://www.kumomado.org/ for more information. #
	#                                                             #
	# This software is licensed under the GNU License v3. Please  #
	# view the LICENSE file for the full text of this license.    #
    #-------------------------------------------------------------#

	Kumomado::load('Filter.KumomadoFilter');
    /**
     * @package libraries/filter/text/
     * @author Tsai, Min Che
	 * @version 1.0
     */
	class AddslashesFilter implements KumomadoFilter {
		/**
		 * Add slashes to the text if magic_quotes_gpc is turned off
		 * @param string $text
		 * @return string
		 */
		public function filter($text) {
			if (!get_magic_quotes_gpc()) {
				$text = addslashes($text);
			}
			return $text;
		}
	}
?>